import request from '@/utils/request'
// var baseUrl = "http://192.168.0.173:8088",
var onlineUrl="http://sun.xinlinju.net"

//配送员列表
export function deliverList(data) {
    return request({
      url:'/path/deliver/list',
      method: 'post',
      data
    })
  }

  //查询场地名称
export function pathQuery() {
  return request({
    url:'/path/query/xls/place',
    method: 'post',
  })
}

//查询场地
export function pathQueryplace() {
  return request({
    url:'/path/query/xls/place',
    method: 'get',
  })
}

//路线列表
export function pathList() {
  return request({
    url:'/path/list',
    method: 'post',
  })
}

//新增编辑路线
export function pathSave(data) {
  return request({
    url:'/path/save',
    method: 'post',
    data
  })
}

// 路线删除
export function pathdelete(id) {
  return request({
    url:`/path/delete?id=${id}`,
    method: 'post',
  })
}

//配送员删除
export function deliverDelete(id) {
    return request({
      url:`/path/deliver/delete?id=${id}`,
      method: 'post',
    })
  }

//新增配送员
export function deliverAdd(name,phone,id) {
    return request({
      url:'/path/deliver/save'+'?name='+name+'&phone='+phone+'&id='+id,
      method: 'post',
    })
  }




// 配送蓝列表
export function basketList() {
  return request({
    url:'/basket/list',
    method: 'post',
  })
}
// 配送篮删除
export function basketDelete(ids) {
  return request({
    url:`/basket/delete?ids=${ids}`,
    method: 'post',
  })
}

//查询路线场地设备联机
export function palceDevice() {
  return request({
    url:'/path/query/path/palce/device',
    method: 'GET',
  })
}
//保存
export function basketSave(pathId,placeId,deviceId) {
  return request({
    url:'/basket/save'+'?pathId='+pathId+'&placeId='+placeId+'&deviceId='+deviceId,
    method: 'post',
  })
}


